package com.lagou.mr;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class SortReducer extends Reducer<LongWritable,LongWritable,LongWritable,LongWritable> {

    private LongWritable lineusum = new LongWritable();


    @Override
    protected void reduce(LongWritable key, Iterable<LongWritable> values, Context context) throws IOException, InterruptedException {
        for (LongWritable v : values) {

            context.write(lineusum,key);
            LongWritable linesum = new LongWritable(lineusum.get() + 1);
        }
    }

}
